﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Sample2
{
    public class FileManager : IDisposable
    {

        private StreamWriter file;

        public FileManager(string path)
        {
            file = new StreamWriter(path);
        }

        public void Write(string s)
        {
            file.WriteLine(s);
        }

        public void Dispose()
        {
            file.Close();
            file.Dispose();
        }
    }
}
